{% from 'macros/icon.njk' import svg with context %}

{% macro projectIcon(project_key) %}
  <div class="project-icon">
    {% set styles = docs[project_key].styles %}
    {% set color = styles.project_icon_color %}
    <div class="project-icon__cover"{% if color %} style="color: var(--{{color}})"{% endif %}>
      {# svg() looks in "_includes", so find the project image in the parent directory #}
      {{ svg('../_static/images/project/' + project_key + '.svg', {hidden: true}) }}
    </div>
  </div>
{% endmacro %}
